const MyPromise = require('./MyPromise_4');
function p1 () {
    return new MyPromise(function (resolve, reject) {
        setTimeout(() => {resolve('p1 success')}, 1000)
    });
}
function p2() {
    return new MyPromise((resolve, reject) => {
        resolve('p2 success')
    })
}


 
MyPromise.resolve(100).then(r => console.log(r));
MyPromise.resolve(p1()).then(r => console.log(r));

